1. Field of the Invention
This invention relates to a method for setting a coordinate system to an automatic machine such as a robot, and more particularly, to a coordinate system setting method in a non-contact way using a visual sensor and coordinate system expressing means.
2. Description of the Related Art
In an automatic machine, such as a machine tool and a robot, having a movable part which moves along a predetermined path according to a robot movement program, a plurality of coordinate systems are set, and an appropriate coordinate system for the movement is selected in accordance with the type of operation. Data representing a position and a posture of the movable part and thus representing a position of the automatic machine is hereinafter referred to "position data".
In the automatic machine, a reference coordinate system (base coordinate system) is fixedly set, and the setting of other coordinate systems is accomplished by determining transfer matrix data representing positions and postures of the other coordinate systems with respect to the reference coordinate system.
Conventionally, in setting a new coordinate system by the foregoing way, a jig having a plurality of fixed points which represent a coordinate system is disposed in a desired position, and a specific point on the movable part of the automatic machine is successively brought into touch with the individual fixed points on the jig. The translation matrix data is obtained based on the data of geometric positions of the respective fixed points on the jig and the position data of the automatic machine each time the movable part is in touch with each fixed point.
For example, a point (0, 0, 0) is selected as a first point to represent the original point of a coordinate system to be set; a point (x0, 0, 0); x0.noteq.0 is selected as a second point to represent the direction of the X axis; a point (0, y0, 0); y0.noteq.0 on the Y axis is selected as a third point to represent the direction of an X-Y plane, from the plurality of points on the jig. Three pins are set at the respective three points, and then the specific point of the movable part is successively brought into direct touch with these pins by the manual operation (jog feed) of the automatic machine. Based on the position data of the automatic machine when the specific point touches the respective pins and data representing the geometric positions of the respective fixed points on the jig, the translation matrix data which represents a relative position and posture of the coordinate system represented by the jig with respect to the base coordinate system is obtained.
However, an extremely precise and delicate manual operation is required for accurately bringing the specific point on the movable part of the automatic machine into touch with a plurality of points on the jig, and therefore it is difficult to set a proper coordinate system in a short time. Further, a substantial error tends to occur due to, for example, the degree of experience of the operator. Furthermore, since it is necessary to actually bring the specific point into touch with the jig, there is a restriction that the automatic machine can not recognize any coordinate system existing out of the range of movement thereof.